
// import { hook_activity } from './activity.js'
import { hook_activity } from '../common/activity.js'
import { hook_LoginManager } from './LoginManager.js'
import { enum_all_methods, enum_all_fields, enum_obj_fields } from '../common/dev.js'

// J:\_ALL\CODE\gitee\constellations\Scorpio\android_test_project\app\src\main\java\com\example\myapplication\ActivityStandAlone.java
function test() {
  // console.log(global.at)
  // console.log(Object.keys(globalThis))
  console.log(Object.keys(global))
  // enum_obj_fields('com.facebook.AuthenticationToken')
  // enum_obj_fields('com.facebook.AccessToken')
  return
  // hook_activity();

  //$InnerClasses 这个表示 类中 InnerClasses类
  var class_name = "com.example.androiddemo.Activity.FridaActivity4$InnerClasses";
  var class_name = "com.facebook.AccessToken";
  enum_all_methods(class_name);
  enum_all_fields(class_name);
}

function main() {
  // test();
  hook_LoginManager();
}


globalThis.m = function() {
  Java.perform(function () {
    try {
      main();
    } catch (error) {
      console.error('error:', error)
    }
  });
};

globalThis.t = function() {
  Java.perform(function () {
    try {
      test();
    } catch (error) {
      console.error('error:', error)
    }
  });
};

console.log(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>> enter index.js");
globalThis.m()
